/*
============================================================================
 Name        : RssFeed.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : TRssFeed declaration
============================================================================
*/

#ifndef __RSSFEED_H__
#define __RSSFEED_H__

// INCLUDES
#include <e32std.h>
#include <e32base.h>

class TItemEnclosure
{
public: //Constructor and descturctor
	TItemEnclosure();
	~TItemEnclosure();

public: //new functions
	const TDesC& Url() const;
	void SetUrl(const TDesC& aUrl);

	const TInt Length() const;
	void SetLength(const TInt aLength);

	const TDesC& Type() const;
	void SetType(const TDesC& aType);

private: //data
	HBufC* iUrl;
	HBufC* iType;
	TInt iLength;
};

class TRssFeedItem
{
public: // Constructor and destructor
	TRssFeedItem();
	~TRssFeedItem();

public: //new functions
	const TDesC& Title() const;
	void SetTitle(const TDesC& aTitle);

	const TDesC& Description() const;
	void SetDescription(const TDesC& aDescription);

	const TItemEnclosure& Enclosure() const;
	void SetEnclosure(TItemEnclosure* aEnclosure);

	TBool IsPlayable();


private: //data
	HBufC* iTitle;
	HBufC* iDescription;
	TItemEnclosure* iEnclosure;
};


class TRssFeed
{
public: // Constructors and destructor
	TRssFeed();
	~TRssFeed();

public: //new functions
	const TDesC& Title() const;
	void SetTitle(const TDesC& aTitle);

	const TDesC& Description() const;
	void SetDescription(const TDesC& aDescription);

	const TDesC& ImageUrl() const;
	void SetImageUrl(const TDesC& aImageUrl);

	RPointerArray<TRssFeedItem> GetItems();
	void AppendItemL(TRssFeedItem* aItem);


private: //data
	HBufC* iTitle;				//title
	HBufC* iDescription;		//description
	HBufC* iImageUrl;			//image url
	RPointerArray<TRssFeedItem> iItems;	//list of rss feed items
};

#endif // __RSSFEED_H__
